Selector Specification
JSON Selector Structure
There are a lot of different selectors types. The set of properties for the selector depends on its type.
Common Fields in Selector Descriptor
property | type | required | description |
---|---|---|---|
selectorType | enum | The selector type which is used to determine the set of other properties. |
Possible values | Available in user mode | Notes |
---|---|---|
paragraph | Paragraph selector | |
boundary | Search area | Used in Custom |
relativeBoundary | Relative boundary selector | |
dynamicCrop | Crop selector | |
reject | Filter selector | Used in negative conditions |
selectorBench | Filter selector | Used in positive conditions |
@Deprecated | ||
@Deprecated | ||
fontColor | Font color selector | |
@Deprecated | ||
font | Font selector | |
align | Align selector | |
regExp | Regular expression selector | |
pattern | Pattern finder selector | |
iban | IBAN selector | |
price | Price selector | |
date | Date selector | |
vat | VAT selector | |
integer | Integer selector | |
time | Time selector | |
line | Line selector | |
tableCluster | Table selector | Used when Cluster algorithm is selected |
table | Table selector | Used when Auto algorithm is selected |
tableFreq | ||
pick | Pick by index selector | |
page | Search area | Used in Page and Custom |
image | Image selector | |
barcode | Barcode selector | |
groupByTb | Grouping selector |
Selector descriptors
Paragraph Selector
Paragraph Selector Descriptor
property | type | required | description | Available parameters in user mode | Template schema version |
---|---|---|---|---|---|
lineSpacing | enum | Defines line spacing coefficient. Possible values:
| Possible values: Normal Large Huge | ||
string | @Deprecated use paragraphNames instead. Defines paragraph name. | [1.0.0,1.2.0) | |||
paragraphNames | List<String> | Defines list of paragraph names. | [1.2.0,) | ||
runningText | boolean | Affecting the recognition result view. If false the resulted recognized paragraph would contain lines joined by new line character. If true then lines would be joined by single space character. | [1.1.1,) | ||
excludeParagraphName | boolean | Affecting recognition result view. If true paragraph name would be excluded from resulted recognized paragraph. If false paragraph name would be included in resulted recognized paragraph | [1.2.0,) | ||
Min Paragraph Selector Example |
Click to expand json
{
"selectorType":"paragraph",
"lineSpacing":"LARGE"
}
Full Paragraph Selector Example
Click to expand json
{
"selectorType": "paragraph",
"lineSpacing": "NORMAL",
"paragraphNames": [
"My Paragraph",
"Second paragraph"
],
"runningText": true,
"excludeParagraphName": false
}
Boundary Selector
Boundary Selector Descriptor
property | type | required | description | Available parameters in user mode |
---|---|---|---|---|
topUsed | boolean | Defines whether the top boundary shall be used. | ||
bottomUsed | boolean | Defines whether the bottom boundary shall be used. | ||
leftUsed | boolean | Defines whether the left boundary shall be used. | ||
rightUsed | boolean | Defines whether the right boundary shall be used. | ||
area | Rectangle | Defines the location of boundary selector. |
At least one of the properties topUsed
, bottomUsed
, leftUsed
, rightUsed
shall be true. If all of them are false, then exception will be thrown.
Boundary Selector Example
Click to expand json
{
"selectorType": "boundary",
"topUsed": true,
"bottomUsed": false,
"leftUsed": true,
"rightUsed": true,
"area": {
"left": 11.0,
"right": 111.0,
"top": 111.0,
"bottom": 11.0
}
}
Relative Boundary Selector
Relative Boundary Selector Descriptor
property | type | required | description | Available parameters in user mode |
---|---|---|---|---|
side | enum | Defines the side for relation. Possible values:
Default value: | Possible values: Left Right Top Bottom | |
Min Relative Boundary Selector Example |
Click to expand json
{
"selectorType": "relativeBoundary"
}
Full Relative Boundary Selector Example
Click to expand json
{
"selectorType": "relativeBoundary",
"side": "RIGHT"
}
Crop Selector
Crop Selector Descriptor
property | type | required | description | Available parameters in user mode |
---|---|---|---|---|
cropVertically | enum | Determines which way relative to crop area vertical crop will be performed. Possible values:
| ||
areaIndex | integer | Defines which area to take as the beginning of crop. Non-zero. 1-based. negative values means counting from the end. Default: 1. | ||
areaSelectors | list<Selector> | Internal selectors used to search for cropArea. The list should be present and not empty. |
Min Crop Selector Example
Click to expand json
{
"selectorType": "dynamicCrop",
"cropVertically": "BEFORE",
"areaSelectors": [
{
"selectorType" : "anySelector"
},
{
"selectorType" : "anySelector1"
},
]
}
Full Crop Selector Example
Click to expand json
{
"selectorType": "dynamicCrop",
"cropVertically": "BEFORE",
"areaIndex": 1,
"areaSelectors": [
{
"selectorType" : "anySelector"
},
{
"selectorType" : "anySelector1"
},
]
}
Reject Selector
Reject Selector Descriptor
property | type | required | description | Available parameters in user mode |
---|---|---|---|---|
rejectBy | list<Selector> | Internal selectors used to define data for reject. The list should be present and not empty. |
Reject Selector Example
Click to expand json
{
"selectorType": "reject",
"rejectBy": [
{
"selectorType" : "anySelector"
},
{
"selectorType" : "anySelector1"
},
]
}
SelectorBench Selector
SelectorBench Selector Descriptor
property | type | required | description | Available parameters in user mode |
---|---|---|---|---|
subType | String | SubType of selector bench. | ||
selectors | list<Selector> | Internal selectors of selector bench. The list is optional. If it is null or empty, then selector bench does not affect recognition. |
Min SelectorBench Selector Example
Click to expand json
{
"selectorType": "selectorBench",
}
Full SelectorBench Selector Example
Click to expand json
{
"selectorType": "selectorBench",
"subType": "filter",
"selectors": [
{
"selectorType" : "anySelector"
},
{
"selectorType" : "anySelector"
},
{
"selectorType" : "anySelector"
}
]
}